package ferran.tomas.ta;

import java.util.ArrayList;

import android.app.Activity;
import android.app.ListActivity;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.ArrayAdapter;
import android.widget.EditText;

public class NewEvent extends Activity {
	EditText contact;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.newevent);

		contact = (EditText) findViewById(R.id.editContact);

	}

	public boolean onCreateOptionsMenu(Menu menu) {
		MenuInflater inflater = getMenuInflater();
		inflater.inflate(R.menu.menu, menu);
		menu.setGroupVisible(R.id.grupo1, false);
		menu.setGroupVisible(R.id.grupo2, false);
		menu.setGroupVisible(R.id.grupo4, false);

		return true;
	}

	public boolean onOptionsItemSelected(MenuItem item) {
		// Handle item selection
		switch (item.getItemId()) {

		case R.id.back:
			back();
			return true;
		default:
			return super.onOptionsItemSelected(item);
		}

	}

	public void back() {
		Intent intent = new Intent(NewEvent.this, MainMenu.class);
		NewEvent.this.startActivity(intent);
	}

	public void add_product() {

	}
}
